package web;

public class SanPham {
	private String masp;
	private String tensp;
	private String ttsp;
	private double gia;

	public SanPham(String masp, String tensp, double gia, String ttsp) {
		this.masp = masp;
		this.tensp = tensp;
		this.gia = gia;
		this.ttsp = ttsp;
		
	}

	public SanPham() {
	}

	public String getMasp() {
		return masp;
	}

	public void setMasp(String masp) {
		this.masp = masp;
	}

	public String getTensp() {
		return tensp;
	}

	public void setTensp(String tensp) {
		this.tensp = tensp;
	}
	
	public String getTtsp() {
		return ttsp;
	}

	public void setTtsp(String ttsp) {
		this.ttsp = ttsp;
	}

	public double getGia() {
		return gia;
	}

	public void setGia(double gia) {
		this.gia = gia;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((masp == null) ? 0 : masp.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SanPham other = (SanPham) obj;
		if (masp == null) {
			if (other.masp != null)
				return false;
		} else if (!masp.equals(other.masp))
			return false;
		return true;
	}
}
